% Copyright (c) 2015-2021 Morwenn
% SPDX-License-Identifier: MIT

\documentclass{standalone}
\usepackage{tikz}
\usepackage[trim]{tokenizer} 

\input{sorting-network}

\begin{document}

\begin{sortingnetwork}{23}{48}{1}
\nodeconnection{{0, 1},{2, 3},{4, 5},{6, 7},{8, 9},{10, 11},{12, 13},{14, 15},{16, 17},{18, 19},{20, 21}}
\nodeconnection{{1, 3},{5, 7},{9, 11},{13, 15},{17, 19}}
\nodeconnection{{0, 2},{4, 6},{8, 10},{12, 14},{16, 18},{20, 22}}
\nodeconnection{{1, 2},{5, 6},{9, 10},{13, 14},{17, 18},{21, 22}}
\nodeconnection{{1, 5},{6, 10},{13, 17},{18, 22}}
\nodeconnection{{2, 6},{14, 18}}
\nodeconnection{{5, 9},{17, 21}}
\nodeconnection{{1, 5},{6, 10},{13, 17},{18, 22}}
\nodeconnection{{0, 4},{7, 11},{12, 16}}
\nodeconnection{{3, 7},{15, 19}}
\nodeconnection{{4, 8},{16, 20}}
\nodeconnection{{0, 4},{7, 11},{12, 16}}
\nodeconnection{{1, 4},{7, 10},{13, 16},{19, 22}}
\nodeconnection{{3, 8},{15, 20}}
\nodeconnection{{2, 3},{8, 9},{14, 15},{20, 21}}
\nodeconnection{{2, 4},{7, 9},{14, 16},{19, 21}}
\nodeconnection{{3, 5},{6, 8},{15, 17},{18, 20}}
\nodeconnection{{3, 4},{5, 6},{7, 8},{15, 16},{17, 18},{19, 20}}

\nodeconnection{{0, 12}}
\nodeconnection{{1, 13}}
\nodeconnection{{2, 14}}
\nodeconnection{{3, 15}}
\nodeconnection{{4, 16}}
\nodeconnection{{5, 17}}
\nodeconnection{{6, 18}}
\nodeconnection{{7, 19}}
\nodeconnection{{8, 20}}
\nodeconnection{{9, 21}}
\nodeconnection{{10, 22}}

\nodeconnection{{2, 12}}
\nodeconnection{{3, 13}}
\nodeconnection{{10, 20}}
\nodeconnection{{11, 21}}

\nodeconnection{{4, 12}}
\nodeconnection{{5, 13}}
\nodeconnection{{6, 14}}
\nodeconnection{{7, 15}}
\nodeconnection{{8, 16}}
\nodeconnection{{9, 17}}
\nodeconnection{{10, 18}}
\nodeconnection{{11, 19}}
\nodeconnection{{8, 12}}
\nodeconnection{{9, 13}}
\nodeconnection{{10, 14}}
\nodeconnection{{11, 15}}
\nodeconnection{{6, 8},{10, 12},{14, 16}}
\nodeconnection{{7, 9},{11, 13},{15, 17}}

\nodeconnection{{1, 2},{3, 4},{5, 6},{7, 8},{9, 10},{11, 12},{13, 14},{15, 16},{17, 18},{19, 20},{21, 22}}
\end{sortingnetwork}

\end{document}
